---
# The name of your project
title: Spring Cloud Pipelines

badges:

  # Specify your project's twitter handle, if any. Delete if none.
  twitter: SpringCloudOSS

  # Customize your project's badges. Delete any entries that do not apply.
  custom:
    - name: Source (GitHub)
      url:  https://github.com/spring-cloud/spring-cloud-pipelines
      icon: github

    - name: StackOverflow
      url:  http://stackoverflow.com/questions/tagged/spring-cloud
      icon: stackoverflow

---
<!DOCTYPE HTML>
<html lang="en-US">
<meta charset="UTF-8">
<meta http-equiv="refresh" content="1; url=https://spring.io/blog/2018/11/13/spring-cloud-pipelines-to-cloud-pipelines-migration">

<script>
  window.location.href = "https://spring.io/blog/2018/11/13/spring-cloud-pipelines-to-cloud-pipelines-migration"
</script>

<title>Page Redirection</title>

<!-- Note: don't tell people to `click` the link, just tell them that it is a link. -->
If you are not redirected automatically, follow the <a href='https://spring.io/blog/2018/11/13/spring-cloud-pipelines-to-cloud-pipelines-migration'>link to the blog post about Spring Cloud Pipelines migration to Cloud Pipelines</a>


<!-- Specify the parent of this project (or delete if none) to influence the rendering of the breadcrumb -->
{% capture parent_link %}
[Spring Cloud]({{ site.projects_site_url }}/spring-cloud)
{% endcapture %}


{% capture billboard_description %}

Spring, Spring Boot and Spring Cloud are tools that allow developers speed up the
time of creating new business features. It's common knowledge however that the
feature is only valuable if it's in production. That's why companies
spend a lot of time and resources on building their own deployment pipelines.

This project tries to solve the following problems:

- Creation of a common deployment pipeline
- Propagation of good testing & deployment practices
- Speed up the time required to deploy a feature to production

A common way of running, configuring and deploying applications lowers support costs
and time needed by new developers to blend in when they change projects.

Currently we support the following CI / CD systems out of the box

* Concourse
* Jenkins

{% endcapture %}

{% capture main_content %}

## Features

Spring Cloud Pipelines comes with the following features

* opinionated microservice pipeline for Concourse

* opinionated microservice pipeline for Jenkins using Job DSL plugin

* opinionated microservice pipeline for Jenkins using the Declarative Pipeline (Jenkinsfile)

* Cloud Foundry PaaS support

* Kubernetes PaaS support

The opinionated pipelines look like this:

![Flow in Concourse](http://cloud.spring.io/spring-cloud-pipelines/images/intro/flow_concourse.png)

*Flow in Concourse*

![Flow in Jenkins](http://cloud.spring.io/spring-cloud-pipelines/images/intro/flow.png)

*Flow in Jenkins*

<span id="quick-start"></span>

## Quick Start

<script type="text/javascript">{% include custom.js %}</script>

### Running the demo for Cloud Foundry

You can easily start by running the default demo setup to run the whole system locally using
Docker / PCF Dev or Minikube.

We are providing a demo pipeline that will build and deploy - [Github Webhook](https://github.com/spring-cloud-samples/github-webhook) application.

All in all there are the following projects taking part in the whole `microservice setup`.

- [Github Analytics](https://github.com/spring-cloud-samples/github-analytics) - the app that has a REST endpoint and uses messaging. Our business application.
- [Github Webhook](https://github.com/spring-cloud-samples/github-webhook) - project that emits messages that are used by Github Analytics. Our business application.
- [Eureka](https://github.com/spring-cloud-samples/github-eureka) - simple Eureka Server. This is an infrastructure application.
- [Github Analytics Stub Runner Boot](https://github.com/spring-cloud-samples/github-analytics-stub-runner-boot) - Stub Runner Boot server to be used for
tests with Github Analytics. Uses Eureka and Messaging. This is an infrastructure application.

For the detailed information please check out the [docs](http://cloud.spring.io/spring-cloud/spring-cloud-pipelines.html).

#### Concourse

* Fork the [Github Webhook](https://github.com/spring-cloud-samples/github-webhook) and [Github Analytics](https://github.com/spring-cloud-samples/github-analytics) repository
* Start [PCF Dev](https://pivotal.io/platform/pcf-tutorials/getting-started-with-pivotal-cloud-foundry-dev/introduction)
* Clone the `spring-cloud-pipelines` project
* Go to `concourse` folder
* Run `./setup-docker-compose.sh` to setup keys for Concourse
* Run `./start.sh 192.168.99.100` to start Concourse and Artifactory (e.g. for `192.168.99.100`
being external IP of your docker images. If you don't have Docker Machine you can run the `./what_my_ip.sh` script
and pass that value here)
* Run `./deploy_infra.sh` to upload to your Artifactory the infrastructure apps (`eureka` and `stub runner`)
* Run `./login.sh 192.168.99.100` to log in to your Concourse (where `192.168.99.100` is you Docker Machine ip -
if you're using `localhost` you don't have to provide that value)
* Setup your `credentials.yml` basing on the provided `credentials-sample-cf.yml` (point to your forked [Github Webhook](https://github.com/spring-cloud-samples/github-webhook))
* Run `./set-pipeline.sh` to setup pipeline for `github-webhook`
* Unpause and run the pipeline in Concourse!
* Once the pipeline passes you can setup a new pipeline for `github-analytics`

For the Kubernetes step by step guide just check out the [documentation](http://cloud.spring.io/spring-cloud-pipelines/single/spring-cloud-pipelines.html#concourse-pipeline-k8s).

#### Jenkins

* Fork the [Github Webhook](https://github.com/spring-cloud-samples/github-webhook) and [Github Analytics](https://github.com/spring-cloud-samples/github-analytics) repository
* Start [PCF Dev](https://pivotal.io/platform/pcf-tutorials/getting-started-with-pivotal-cloud-foundry-dev/introduction)
* Clone the `spring-cloud-pipelines` project
* Go to `jenkins` folder
* Run `./start.sh yourGithubUser yourGithubPass yourGithubOrg` to start Jenkins and Artifactory (`yourGithubUser` and `yourGithubPass`
are your Github credentials required by the pipeline to tag the forked repo that lays in `yourGithubOrg`;
you could also pass `-key path_to_private_key` if you prefer to use the key-based authentication with your Git repositories)
* Run `./deploy_infra.sh` to upload to your Artifactory the infrastructure apps (`eureka` and `stub runner`)
* Go to Jenkins and click the `jenkins-pipeline-seed` in order to generate the pipeline jobs
* Go to the `github-webhook` pipeline view and click the `play` button to run the pipeline

For the Kubernetes step by step guide just check out the [documentation](http://cloud.spring.io/spring-cloud-pipelines/single/spring-cloud-pipelines.html#jenkins-pipeline-k8s).

### Adjusting the pipelines to your needs

This repository can be treated as a template for your pipeline. We provide some opinionated
implementation that you can alter to suit your needs. The best approach to use it
to build your production projects would be to download the Spring Cloud Pipelines repository as ZIP, then
init a Git project there and modify it as you wish.

Example for using the code from `master` branch. You can use a tag for example `1.0.0.M2`. Then your URL will look like this
`https://github.com/spring-cloud/spring-cloud-pipelines/archive/1.0.0.M2.zip` .

```
$ curl -LOk https://github.com/spring-cloud/spring-cloud-pipelines/archive/master.zip
$ unzip master.zip
$ cd spring-cloud-pipelines-master
$ git init
$ ./gradlew customize
$ # modify the pipelines to suit your needs
$ git add .
$ git commit -m "Initial commit"
$ git remote add origin ${YOUR_REPOSITORY_URL}
$ git push origin master
```

Why aren't you simply cloning the repo? This is meant to be a seed
for building new, versioned pipelines for you. You don't want to have all of our
history dragged along with you, don't you?

{% endcapture %}

{% capture related_resources %}

### Sample Projects

* [Github Analytics](https://github.com/spring-cloud-samples/github-analytics) - the app that has a REST endpoint and uses messaging. Our business application.
* [Github Webhook](https://github.com/spring-cloud-samples/github-webhook) - project that emits messages that are used by Github Analytics. Our business application.
* [Github Analytics Kubernetes](https://github.com/spring-cloud-samples/github-analytics-kubernetes) - the app that has a REST endpoint and uses messaging. Our business application.
* [Github Webhook Kubernetes](https://github.com/spring-cloud-samples/github-webhook-kubernetes) - project that emits messages that are used by Github Analytics. Our business application.
* [Eureka](https://github.com/spring-cloud-samples/github-eureka) - simple Eureka Server. This is an infrastructure application.
* [Github Analytics Stub Runner Boot](https://github.com/spring-cloud-samples/github-analytics-stub-runner-boot) - Stub Runner Boot server to be used  for mocking Github Analytics dependencies

{% endcapture %}


{% include project_page.html %}
</html>
